<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>
<body>
  <div id="root">
    <h2>列表的渲染</h2>
    <ul>
      <li v-for="item in persons" key="item.id">{{item.name}} ---- {{item.age}}</li>
    </ul>
  </div>

  <script>
    Vue.config.ProductionTip = false;
    Vue.config.devtools = true

    const vm = new Vue({
      el: '#root',
      data: {
        persons: [
          {id: '001', name: 'zhang', age: 25},
          {id: '002', name: 'zhang1', age: 26},
          {id: '003', name: 'zhang2', age: 27},
          {id: '004', name: 'zhang3', age: 28}
        ]
      }
    })
  </script>
</body>
</html>